package com.sun.java.Collection;

import java.util.*;


public class FindDups {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自动生成方法存根

		Set<String> s = new HashSet<String>();
		for(String a : args){
			if(!s.add(a)){
				System.out.print("Duplicate detected: a" + a);
			}
			System.out.println(s.size()+" distinct words: "+ s);
		}
	}

}
